.class public Lcom/htc/android/footprints/provider/FootprintManager;
.super Ljava/lang/Object;
.source "FootprintManager.java"


# static fields
.field private static final CATEGORY_PROJECTION:[Ljava/lang/String; = null

.field private static final FOOTPRINT_PROJECTION:[Ljava/lang/String; = null

.field private static final TAG:Ljava/lang/String; = "FootprintManager"

.field private static idxAccuracy:I

.field private static idxAddr:I

.field private static idxAudioLength:I

.field private static idxAudioName:I

.field private static idxAudioPath:I

.field private static idxCategory:I

.field private static idxComment:I

.field private static idxCreateTime:I

.field private static idxDrawableId:I

.field private static idxId:I

.field private static idxLatitude:I

.field private static idxLongitude:I

.field private static idxName:I

.field private static idxPicName:I

.field private static idxPicPath:I

.field private static idxRate:I

.field private static idxShortDate:I

.field private static idxSite:I

.field private static idxTel:I

.field private static idxVersion:I

.field private static mInstance:Lcom/htc/android/footprints/provider/FootprintManager;


# instance fields
.field private mDB:Landroid/content/ContentResolver;


# direct methods
.method static constructor <clinit>()V
    .locals 8

    .prologue
    const/4 v7, 0x3

    const/4 v6, 0x2

    const/4 v5, 0x1

    const/4 v4, 0x0

    const/4 v3, -0x1

    .line 34
    const/4 v0, 0x0

    sput-object v0, Lcom/htc/android/footprints/provider/FootprintManager;->mInstance:Lcom/htc/android/footprints/provider/FootprintManager;

    .line 37
    const/16 v0, 0x14

    new-array v0, v0, [Ljava/lang/String;

    const-string v1, "_id"

    aput-object v1, v0, v4

    const-string v1, "name"

    aput-object v1, v0, v5

    const-string v1, "tel"

    aput-object v1, v0, v6

    const-string v1, "addr"

    aput-object v1, v0, v7

    const/4 v1, 0x4

    const-string v2, "comment"

    aput-object v2, v0, v1

    const/4 v1, 0x5

    const-string v2, "category"

    aput-object v2, v0, v1

    const/4 v1, 0x6

    const-string v2, "create_time"

    aput-object v2, v0, v1

    const/4 v1, 0x7

    const-string v2, "latitude"

    aput-object v2, v0, v1

    const/16 v1, 0x8

    const-string v2, "longitude"

    aput-object v2, v0, v1

    const/16 v1, 0x9

    const-string v2, "site"

    aput-object v2, v0, v1

    const/16 v1, 0xa

    const-string v2, "rate"

    aput-object v2, v0, v1

    const/16 v1, 0xb

    const-string v2, "drawable_id"

    aput-object v2, v0, v1

    const/16 v1, 0xc

    const-string v2, "version"

    aput-object v2, v0, v1

    const/16 v1, 0xd

    const-string v2, "audio_path"

    aput-object v2, v0, v1

    const/16 v1, 0xe

    const-string v2, "pic_path"

    aput-object v2, v0, v1

    const/16 v1, 0xf

    const-string v2, "accuracy"

    aput-object v2, v0, v1

    const/16 v1, 0x10

    const-string v2, "pic_name"

    aput-object v2, v0, v1

    const/16 v1, 0x11

    const-string v2, "audio_name"

    aput-object v2, v0, v1

    const/16 v1, 0x12

    const-string v2, "audio_length"

    aput-object v2, v0, v1

    const/16 v1, 0x13

    const-string v2, "short_date"

    aput-object v2, v0, v1

    sput-object v0, Lcom/htc/android/footprints/provider/FootprintManager;->FOOTPRINT_PROJECTION:[Ljava/lang/String;

    .line 50
    new-array v0, v7, [Ljava/lang/String;

    const-string v1, "keyword"

    aput-object v1, v0, v4

    const-string v1, "name"

    aput-object v1, v0, v5

    const-string v1, "icon_id"

    aput-object v1, v0, v6

    sput-object v0, Lcom/htc/android/footprints/provider/FootprintManager;->CATEGORY_PROJECTION:[Ljava/lang/String;

    .line 454
    sput v3, Lcom/htc/android/footprints/provider/FootprintManager;->idxId:I

    .line 455
    sput v3, Lcom/htc/android/footprints/provider/FootprintManager;->idxName:I

    .line 456
    sput v3, Lcom/htc/android/footprints/provider/FootprintManager;->idxTel:I

    .line 457
    sput v3, Lcom/htc/android/footprints/provider/FootprintManager;->idxAddr:I

    .line 458
    sput v3, Lcom/htc/android/footprints/provider/FootprintManager;->idxComment:I

    .line 459
    sput v3, Lcom/htc/android/footprints/provider/FootprintManager;->idxCategory:I

    .line 460
    sput v3, Lcom/htc/android/footprints/provider/FootprintManager;->idxCreateTime:I

    .line 461
    sput v3, Lcom/htc/android/footprints/provider/FootprintManager;->idxLatitude:I

    .line 462
    sput v3, Lcom/htc/android/footprints/provider/FootprintManager;->idxLongitude:I

    .line 463
    sput v3, Lcom/htc/android/footprints/provider/FootprintManager;->idxSite:I

    .line 464
    sput v3, Lcom/htc/android/footprints/provider/FootprintManager;->idxRate:I

    .line 465
    sput v3, Lcom/htc/android/footprints/provider/FootprintManager;->idxDrawableId:I

    .line 466
    sput v3, Lcom/htc/android/footprints/provider/FootprintManager;->idxVersion:I

    .line 467
    sput v3, Lcom/htc/android/footprints/provider/FootprintManager;->idxAudioPath:I

    .line 468
    sput v3, Lcom/htc/android/footprints/provider/FootprintManager;->idxPicPath:I

    .line 469
    sput v3, Lcom/htc/android/footprints/provider/FootprintManager;->idxAccuracy:I

    .line 470
    sput v3, Lcom/htc/android/footprints/provider/FootprintManager;->idxPicName:I

    .line 471
    sput v3, Lcom/htc/android/footprints/provider/FootprintManager;->idxAudioName:I

    .line 472
    sput v3, Lcom/htc/android/footprints/provider/FootprintManager;->idxAudioLength:I

    .line 473
    sput v3, Lcom/htc/android/footprints/provider/FootprintManager;->idxShortDate:I

    return-void
.end method

.method private constructor <init>(Landroid/content/Context;)V
    .locals 1
    .parameter "context"

    .prologue
    .line 63
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 33
    const/4 v0, 0x0

    iput-object v0, p0, Lcom/htc/android/footprints/provider/FootprintManager;->mDB:Landroid/content/ContentResolver;

    .line 64
    invoke-virtual {p1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v0

    iput-object v0, p0, Lcom/htc/android/footprints/provider/FootprintManager;->mDB:Landroid/content/ContentResolver;

    .line 65
    return-void
.end method

.method public static checkContentValues(Landroid/content/ContentValues;)Z
    .locals 7
    .parameter "values"

    .prologue
    .line 614
    const/4 v2, 0x1

    .line 615
    .local v2, result:Z
    const-string v5, "name"

    invoke-virtual {p0, v5}, Landroid/content/ContentValues;->getAsString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    .line 616
    .local v0, name:Ljava/lang/String;
    if-eqz v0, :cond_0

    invoke-virtual {v0}, Ljava/lang/String;->length()I

    move-result v5

    if-nez v5, :cond_1

    :cond_0
    const/4 v2, 0x0

    .line 618
    :cond_1
    const-string v5, "create_time"

    invoke-virtual {p0, v5}, Landroid/content/ContentValues;->getAsLong(Ljava/lang/String;)Ljava/lang/Long;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/Long;->longValue()J

    move-result-wide v3

    .line 619
    .local v3, time:J
    const-wide/16 v5, 0x0

    cmp-long v5, v3, v5

    if-nez v5, :cond_2

    const/4 v2, 0x0

    .line 621
    :cond_2
    const-string v5, "pic_path"

    invoke-virtual {p0, v5}, Landroid/content/ContentValues;->getAsString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    .line 622
    .local v1, photo_path:Ljava/lang/String;
    if-eqz v1, :cond_3

    invoke-virtual {v1}, Ljava/lang/String;->length()I

    move-result v5

    if-nez v5, :cond_4

    :cond_3
    const/4 v2, 0x0

    .line 623
    :cond_4
    return v2
.end method

.method public static checkContentValues(Lcom/htc/android/footprints/vo/Footprint;)Z
    .locals 5
    .parameter "footprint"

    .prologue
    .line 632
    const/4 v0, 0x1

    .line 633
    .local v0, result:Z
    iget-object v1, p0, Lcom/htc/android/footprints/vo/Footprint;->mName:Ljava/lang/String;

    if-eqz v1, :cond_0

    iget-object v1, p0, Lcom/htc/android/footprints/vo/Footprint;->mName:Ljava/lang/String;

    invoke-virtual {v1}, Ljava/lang/String;->length()I

    move-result v1

    if-nez v1, :cond_1

    :cond_0
    const/4 v0, 0x0

    .line 635
    :cond_1
    iget-wide v1, p0, Lcom/htc/android/footprints/vo/Footprint;->mCreateTime:J

    const-wide/16 v3, 0x0

    cmp-long v1, v1, v3

    if-nez v1, :cond_2

    const/4 v0, 0x0

    .line 637
    :cond_2
    iget-object v1, p0, Lcom/htc/android/footprints/vo/Footprint;->mPicPath:Ljava/lang/String;

    if-eqz v1, :cond_3

    iget-object v1, p0, Lcom/htc/android/footprints/vo/Footprint;->mPicPath:Ljava/lang/String;

    invoke-virtual {v1}, Ljava/lang/String;->length()I

    move-result v1

    if-nez v1, :cond_4

    :cond_3
    const/4 v0, 0x0

    .line 638
    :cond_4
    return v0
.end method

.method private fillDataFromCursor(Lcom/htc/android/footprints/vo/Category;Landroid/database/Cursor;)V
    .locals 1
    .parameter "category"
    .parameter "cursor"

    .prologue
    .line 537
    const-string v0, "keyword"

    invoke-interface {p2, v0}, Landroid/database/Cursor;->getColumnIndexOrThrow(Ljava/lang/String;)I

    move-result v0

    invoke-interface {p2, v0}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v0

    iput-object v0, p1, Lcom/htc/android/footprints/vo/Category;->mKeyword:Ljava/lang/String;

    .line 540
    const-string v0, "name"

    invoke-interface {p2, v0}, Landroid/database/Cursor;->getColumnIndexOrThrow(Ljava/lang/String;)I

    move-result v0

    invoke-interface {p2, v0}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v0

    iput-object v0, p1, Lcom/htc/android/footprints/vo/Category;->mName:Ljava/lang/String;

    .line 543
    const-string v0, "icon_id"

    invoke-interface {p2, v0}, Landroid/database/Cursor;->getColumnIndexOrThrow(Ljava/lang/String;)I

    move-result v0

    invoke-interface {p2, v0}, Landroid/database/Cursor;->getInt(I)I

    move-result v0

    iput v0, p1, Lcom/htc/android/footprints/vo/Category;->mIconID:I

    .line 546
    return-void
.end method

.method public static fillDataFromCursor(Lcom/htc/android/footprints/vo/Footprint;Landroid/database/Cursor;)V
    .locals 2
    .parameter "footprint"
    .parameter "cursor"

    .prologue
    .line 476
    sget v0, Lcom/htc/android/footprints/provider/FootprintManager;->idxId:I

    const/4 v1, -0x1

    if-ne v0, v1, :cond_0

    .line 477
    const-string v0, "_id"

    invoke-interface {p1, v0}, Landroid/database/Cursor;->getColumnIndexOrThrow(Ljava/lang/String;)I

    move-result v0

    sput v0, Lcom/htc/android/footprints/provider/FootprintManager;->idxId:I

    .line 478
    const-string v0, "name"

    invoke-interface {p1, v0}, Landroid/database/Cursor;->getColumnIndexOrThrow(Ljava/lang/String;)I

    move-result v0

    sput v0, Lcom/htc/android/footprints/provider/FootprintManager;->idxName:I

    .line 479
    const-string v0, "tel"

    invoke-interface {p1, v0}, Landroid/database/Cursor;->getColumnIndexOrThrow(Ljava/lang/String;)I

    move-result v0

    sput v0, Lcom/htc/android/footprints/provider/FootprintManager;->idxTel:I

    .line 480
    const-string v0, "addr"

    invoke-interface {p1, v0}, Landroid/database/Cursor;->getColumnIndexOrThrow(Ljava/lang/String;)I

    move-result v0

    sput v0, Lcom/htc/android/footprints/provider/FootprintManager;->idxAddr:I

    .line 481
    const-string v0, "comment"

    invoke-interface {p1, v0}, Landroid/database/Cursor;->getColumnIndexOrThrow(Ljava/lang/String;)I

    move-result v0

    sput v0, Lcom/htc/android/footprints/provider/FootprintManager;->idxComment:I

    .line 482
    const-string v0, "category"

    invoke-interface {p1, v0}, Landroid/database/Cursor;->getColumnIndexOrThrow(Ljava/lang/String;)I

    move-result v0

    sput v0, Lcom/htc/android/footprints/provider/FootprintManager;->idxCategory:I

    .line 483
    const-string v0, "create_time"

    invoke-interface {p1, v0}, Landroid/database/Cursor;->getColumnIndexOrThrow(Ljava/lang/String;)I

    move-result v0

    sput v0, Lcom/htc/android/footprints/provider/FootprintManager;->idxCreateTime:I

    .line 484
    const-string v0, "latitude"

    invoke-interface {p1, v0}, Landroid/database/Cursor;->getColumnIndexOrThrow(Ljava/lang/String;)I

    move-result v0

    sput v0, Lcom/htc/android/footprints/provider/FootprintManager;->idxLatitude:I

    .line 485
    const-string v0, "longitude"

    invoke-interface {p1, v0}, Landroid/database/Cursor;->getColumnIndexOrThrow(Ljava/lang/String;)I

    move-result v0

    sput v0, Lcom/htc/android/footprints/provider/FootprintManager;->idxLongitude:I

    .line 486
    const-string v0, "site"

    invoke-interface {p1, v0}, Landroid/database/Cursor;->getColumnIndexOrThrow(Ljava/lang/String;)I

    move-result v0

    sput v0, Lcom/htc/android/footprints/provider/FootprintManager;->idxSite:I

    .line 487
    const-string v0, "rate"

    invoke-interface {p1, v0}, Landroid/database/Cursor;->getColumnIndexOrThrow(Ljava/lang/String;)I

    move-result v0

    sput v0, Lcom/htc/android/footprints/provider/FootprintManager;->idxRate:I

    .line 488
    const-string v0, "drawable_id"

    invoke-interface {p1, v0}, Landroid/database/Cursor;->getColumnIndexOrThrow(Ljava/lang/String;)I

    move-result v0

    sput v0, Lcom/htc/android/footprints/provider/FootprintManager;->idxDrawableId:I

    .line 489
    const-string v0, "version"

    invoke-interface {p1, v0}, Landroid/database/Cursor;->getColumnIndexOrThrow(Ljava/lang/String;)I

    move-result v0

    sput v0, Lcom/htc/android/footprints/provider/FootprintManager;->idxVersion:I

    .line 490
    const-string v0, "audio_path"

    invoke-interface {p1, v0}, Landroid/database/Cursor;->getColumnIndexOrThrow(Ljava/lang/String;)I

    move-result v0

    sput v0, Lcom/htc/android/footprints/provider/FootprintManager;->idxAudioPath:I

    .line 491
    const-string v0, "pic_path"

    invoke-interface {p1, v0}, Landroid/database/Cursor;->getColumnIndexOrThrow(Ljava/lang/String;)I

    move-result v0

    sput v0, Lcom/htc/android/footprints/provider/FootprintManager;->idxPicPath:I

    .line 492
    const-string v0, "accuracy"

    invoke-interface {p1, v0}, Landroid/database/Cursor;->getColumnIndexOrThrow(Ljava/lang/String;)I

    move-result v0

    sput v0, Lcom/htc/android/footprints/provider/FootprintManager;->idxAccuracy:I

    .line 493
    const-string v0, "pic_name"

    invoke-interface {p1, v0}, Landroid/database/Cursor;->getColumnIndexOrThrow(Ljava/lang/String;)I

    move-result v0

    sput v0, Lcom/htc/android/footprints/provider/FootprintManager;->idxPicName:I

    .line 494
    const-string v0, "audio_name"

    invoke-interface {p1, v0}, Landroid/database/Cursor;->getColumnIndexOrThrow(Ljava/lang/String;)I

    move-result v0

    sput v0, Lcom/htc/android/footprints/provider/FootprintManager;->idxAudioName:I

    .line 495
    const-string v0, "audio_length"

    invoke-interface {p1, v0}, Landroid/database/Cursor;->getColumnIndexOrThrow(Ljava/lang/String;)I

    move-result v0

    sput v0, Lcom/htc/android/footprints/provider/FootprintManager;->idxAudioLength:I

    .line 496
    const-string v0, "short_date"

    invoke-interface {p1, v0}, Landroid/database/Cursor;->getColumnIndexOrThrow(Ljava/lang/String;)I

    move-result v0

    sput v0, Lcom/htc/android/footprints/provider/FootprintManager;->idxShortDate:I

    .line 499
    :cond_0
    sget v0, Lcom/htc/android/footprints/provider/FootprintManager;->idxId:I

    invoke-interface {p1, v0}, Landroid/database/Cursor;->getInt(I)I

    move-result v0

    invoke-virtual {p0, v0}, Lcom/htc/android/footprints/vo/Footprint;->setID(I)V

    .line 500
    sget v0, Lcom/htc/android/footprints/provider/FootprintManager;->idxName:I

    invoke-interface {p1, v0}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/htc/android/footprints/vo/Footprint;->mName:Ljava/lang/String;

    .line 501
    sget v0, Lcom/htc/android/footprints/provider/FootprintManager;->idxTel:I

    invoke-interface {p1, v0}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/htc/android/footprints/vo/Footprint;->mTel:Ljava/lang/String;

    .line 502
    sget v0, Lcom/htc/android/footprints/provider/FootprintManager;->idxAddr:I

    invoke-interface {p1, v0}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/htc/android/footprints/vo/Footprint;->mAddr:Ljava/lang/String;

    .line 503
    sget v0, Lcom/htc/android/footprints/provider/FootprintManager;->idxComment:I

    invoke-interface {p1, v0}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/htc/android/footprints/vo/Footprint;->mComment:Ljava/lang/String;

    .line 504
    sget v0, Lcom/htc/android/footprints/provider/FootprintManager;->idxCategory:I

    invoke-interface {p1, v0}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/htc/android/footprints/vo/Footprint;->mCategory:Ljava/lang/String;

    .line 505
    sget v0, Lcom/htc/android/footprints/provider/FootprintManager;->idxCreateTime:I

    invoke-interface {p1, v0}, Landroid/database/Cursor;->getLong(I)J

    move-result-wide v0

    iput-wide v0, p0, Lcom/htc/android/footprints/vo/Footprint;->mCreateTime:J

    .line 506
    sget v0, Lcom/htc/android/footprints/provider/FootprintManager;->idxLatitude:I

    invoke-interface {p1, v0}, Landroid/database/Cursor;->getInt(I)I

    move-result v0

    iput v0, p0, Lcom/htc/android/footprints/vo/Footprint;->mLatitude:I

    .line 507
    sget v0, Lcom/htc/android/footprints/provider/FootprintManager;->idxLongitude:I

    invoke-interface {p1, v0}, Landroid/database/Cursor;->getInt(I)I

    move-result v0

    iput v0, p0, Lcom/htc/android/footprints/vo/Footprint;->mLongitude:I

    .line 508
    sget v0, Lcom/htc/android/footprints/provider/FootprintManager;->idxSite:I

    invoke-interface {p1, v0}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/htc/android/footprints/vo/Footprint;->mSite:Ljava/lang/String;

    .line 509
    sget v0, Lcom/htc/android/footprints/provider/FootprintManager;->idxRate:I

    invoke-interface {p1, v0}, Landroid/database/Cursor;->getInt(I)I

    move-result v0

    iput v0, p0, Lcom/htc/android/footprints/vo/Footprint;->mRate:I

    .line 510
    sget v0, Lcom/htc/android/footprints/provider/FootprintManager;->idxDrawableId:I

    invoke-interface {p1, v0}, Landroid/database/Cursor;->getLong(I)J

    move-result-wide v0

    iput-wide v0, p0, Lcom/htc/android/footprints/vo/Footprint;->mDrewableID:J

    .line 511
    sget v0, Lcom/htc/android/footprints/provider/FootprintManager;->idxVersion:I

    invoke-interface {p1, v0}, Landroid/database/Cursor;->getInt(I)I

    move-result v0

    iput v0, p0, Lcom/htc/android/footprints/vo/Footprint;->mVersion:I

    .line 512
    sget v0, Lcom/htc/android/footprints/provider/FootprintManager;->idxAudioPath:I

    invoke-interface {p1, v0}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/htc/android/footprints/vo/Footprint;->mAudioPath:Ljava/lang/String;

    .line 513
    sget v0, Lcom/htc/android/footprints/provider/FootprintManager;->idxPicPath:I

    invoke-interface {p1, v0}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/htc/android/footprints/vo/Footprint;->mPicPath:Ljava/lang/String;

    .line 514
    sget v0, Lcom/htc/android/footprints/provider/FootprintManager;->idxAccuracy:I

    invoke-interface {p1, v0}, Landroid/database/Cursor;->getInt(I)I

    move-result v0

    iput v0, p0, Lcom/htc/android/footprints/vo/Footprint;->mAccuracy:I

    .line 515
    sget v0, Lcom/htc/android/footprints/provider/FootprintManager;->idxPicName:I

    invoke-interface {p1, v0}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/htc/android/footprints/vo/Footprint;->mPicFileName:Ljava/lang/String;

    .line 516
    sget v0, Lcom/htc/android/footprints/provider/FootprintManager;->idxAudioName:I

    invoke-interface {p1, v0}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/htc/android/footprints/vo/Footprint;->mAudioFileName:Ljava/lang/String;

    .line 517
    sget v0, Lcom/htc/android/footprints/provider/FootprintManager;->idxAudioLength:I

    invoke-interface {p1, v0}, Landroid/database/Cursor;->getFloat(I)F

    move-result v0

    iput v0, p0, Lcom/htc/android/footprints/vo/Footprint;->mVoiceSampleLength:F

    .line 518
    sget v0, Lcom/htc/android/footprints/provider/FootprintManager;->idxShortDate:I

    invoke-interface {p1, v0}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/htc/android/footprints/vo/Footprint;->mShortDate:Ljava/lang/String;

    .line 534
    return-void
.end method

.method private fillVauleFromCategory(Landroid/content/ContentValues;Lcom/htc/android/footprints/vo/Category;)V
    .locals 2
    .parameter "values"
    .parameter "category"

    .prologue
    .line 449
    const-string v0, "keyword"

    iget-object v1, p2, Lcom/htc/android/footprints/vo/Category;->mKeyword:Ljava/lang/String;

    invoke-virtual {p1, v0, v1}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V

    .line 450
    const-string v0, "name"

    iget-object v1, p2, Lcom/htc/android/footprints/vo/Category;->mName:Ljava/lang/String;

    invoke-virtual {p1, v0, v1}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V

    .line 451
    const-string v0, "icon_id"

    iget v1, p2, Lcom/htc/android/footprints/vo/Category;->mIconID:I

    invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    invoke-virtual {p1, v0, v1}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/Integer;)V

    .line 452
    return-void
.end method

.method public static fillVauleFromFootprint(Landroid/content/ContentValues;Lcom/htc/android/footprints/vo/Footprint;)V
    .locals 5
    .parameter "values"
    .parameter "footprint"

    .prologue
    .line 422
    invoke-virtual {p1}, Lcom/htc/android/footprints/vo/Footprint;->getID()I

    move-result v1

    const/4 v2, -0x1

    if-le v1, v2, :cond_0

    .line 423
    const-string v1, "_id"

    invoke-virtual {p1}, Lcom/htc/android/footprints/vo/Footprint;->getID()I

    move-result v2

    invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v2

    invoke-virtual {p0, v1, v2}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/Integer;)V

    .line 425
    :cond_0
    new-instance v0, Ljava/text/SimpleDateFormat;

    const-string v1, "MM/dd/yy"

    invoke-direct {v0, v1}, Ljava/text/SimpleDateFormat;-><init>(Ljava/lang/String;)V

    .line 426
    .local v0, timeFormatter:Ljava/text/SimpleDateFormat;
    const-string v1, "name"

    iget-object v2, p1, Lcom/htc/android/footprints/vo/Footprint;->mName:Ljava/lang/String;

    invoke-virtual {p0, v1, v2}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V

    .line 427
    const-string v1, "tel"

    iget-object v2, p1, Lcom/htc/android/footprints/vo/Footprint;->mTel:Ljava/lang/String;

    invoke-virtual {p0, v1, v2}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V

    .line 428
    const-string v1, "addr"

    iget-object v2, p1, Lcom/htc/android/footprints/vo/Footprint;->mAddr:Ljava/lang/String;

    invoke-virtual {p0, v1, v2}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V

    .line 429
    const-string v1, "comment"

    iget-object v2, p1, Lcom/htc/android/footprints/vo/Footprint;->mComment:Ljava/lang/String;

    invoke-virtual {p0, v1, v2}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V

    .line 430
    const-string v1, "category"

    iget-object v2, p1, Lcom/htc/android/footprints/vo/Footprint;->mCategory:Ljava/lang/String;

    invoke-virtual {p0, v1, v2}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V

    .line 431
    const-string v1, "create_time"

    iget-wide v2, p1, Lcom/htc/android/footprints/vo/Footprint;->mCreateTime:J

    invoke-static {v2, v3}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v2

    invoke-virtual {p0, v1, v2}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/Long;)V

    .line 432
    const-string v1, "latitude"

    iget v2, p1, Lcom/htc/android/footprints/vo/Footprint;->mLatitude:I

    invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v2

    invoke-virtual {p0, v1, v2}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/Integer;)V

    .line 433
    const-string v1, "longitude"

    iget v2, p1, Lcom/htc/android/footprints/vo/Footprint;->mLongitude:I

    invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v2

    invoke-virtual {p0, v1, v2}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/Integer;)V

    .line 434
    const-string v1, "site"

    iget-object v2, p1, Lcom/htc/android/footprints/vo/Footprint;->mSite:Ljava/lang/String;

    invoke-virtual {p0, v1, v2}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V

    .line 435
    const-string v1, "rate"

    iget v2, p1, Lcom/htc/android/footprints/vo/Footprint;->mRate:I

    invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v2

    invoke-virtual {p0, v1, v2}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/Integer;)V

    .line 436
    const-string v1, "drawable_id"

    iget-wide v2, p1, Lcom/htc/android/footprints/vo/Footprint;->mDrewableID:J

    invoke-static {v2, v3}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v2

    invoke-virtual {p0, v1, v2}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/Long;)V

    .line 437
    const-string v1, "version"

    iget v2, p1, Lcom/htc/android/footprints/vo/Footprint;->mVersion:I

    invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v2

    invoke-virtual {p0, v1, v2}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/Integer;)V

    .line 438
    const-string v1, "audio_path"

    iget-object v2, p1, Lcom/htc/android/footprints/vo/Footprint;->mAudioPath:Ljava/lang/String;

    invoke-virtual {p0, v1, v2}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V

    .line 439
    const-string v1, "pic_path"

    iget-object v2, p1, Lcom/htc/android/footprints/vo/Footprint;->mPicPath:Ljava/lang/String;

    invoke-virtual {p0, v1, v2}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V

    .line 440
    const-string v1, "accuracy"

    iget v2, p1, Lcom/htc/android/footprints/vo/Footprint;->mAccuracy:I

    invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v2

    invoke-virtual {p0, v1, v2}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/Integer;)V

    .line 441
    const-string v1, "pic_name"

    iget-object v2, p1, Lcom/htc/android/footprints/vo/Footprint;->mPicFileName:Ljava/lang/String;

    invoke-virtual {p0, v1, v2}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V

    .line 442
    const-string v1, "audio_name"

    iget-object v2, p1, Lcom/htc/android/footprints/vo/Footprint;->mAudioFileName:Ljava/lang/String;

    invoke-virtual {p0, v1, v2}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V

    .line 443
    const-string v1, "audio_length"

    iget v2, p1, Lcom/htc/android/footprints/vo/Footprint;->mVoiceSampleLength:F

    invoke-static {v2}, Ljava/lang/Float;->valueOf(F)Ljava/lang/Float;

    move-result-object v2

    invoke-virtual {p0, v1, v2}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/Float;)V

    .line 444
    const-string v1, "short_date"

    new-instance v2, Ljava/util/Date;

    iget-wide v3, p1, Lcom/htc/android/footprints/vo/Footprint;->mCreateTime:J

    invoke-direct {v2, v3, v4}, Ljava/util/Date;-><init>(J)V

    invoke-virtual {v0, v2}, Ljava/text/SimpleDateFormat;->format(Ljava/util/Date;)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {p0, v1, v2}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V

    .line 446
    return-void
.end method

.method public static getInstance(Landroid/content/Context;)Lcom/htc/android/footprints/provider/FootprintManager;
    .locals 2
    .parameter "context"

    .prologue
    .line 56
    sget-object v0, Lcom/htc/android/footprints/provider/FootprintManager;->mInstance:Lcom/htc/android/footprints/provider/FootprintManager;

    if-nez v0, :cond_0

    .line 57
    new-instance v0, Lcom/htc/android/footprints/provider/FootprintManager;

    invoke-virtual {p0}, Landroid/content/Context;->getApplicationContext()Landroid/content/Context;

    move-result-object v1

    invoke-direct {v0, v1}, Lcom/htc/android/footprints/provider/FootprintManager;-><init>(Landroid/content/Context;)V

    sput-object v0, Lcom/htc/android/footprints/provider/FootprintManager;->mInstance:Lcom/htc/android/footprints/provider/FootprintManager;

    .line 59
    :cond_0
    sget-object v0, Lcom/htc/android/footprints/provider/FootprintManager;->mInstance:Lcom/htc/android/footprints/provider/FootprintManager;

    return-object v0
.end method

.method private quotedStr(Ljava/lang/String;)Ljava/lang/String;
    .locals 3
    .parameter "str"

    .prologue
    const-string v2, "\'"

    .line 416
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    const-string v1, "\'"

    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, "\'"

    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method


# virtual methods
.method public addCategory(Lcom/htc/android/footprints/vo/Category;)Landroid/net/Uri;
    .locals 3
    .parameter "g"

    .prologue
    .line 318
    new-instance v0, Landroid/content/ContentValues;

    invoke-direct {v0}, Landroid/content/ContentValues;-><init>()V

    .line 320
    .local v0, values:Landroid/content/ContentValues;
    invoke-direct {p0, v0, p1}, Lcom/htc/android/footprints/provider/FootprintManager;->fillVauleFromCategory(Landroid/content/ContentValues;Lcom/htc/android/footprints/vo/Category;)V

    .line 323
    iget-object v1, p0, Lcom/htc/android/footprints/provider/FootprintManager;->mDB:Landroid/content/ContentResolver;

    sget-object v2, Lcom/htc/android/footprints/provider/CategoryProvider$CategoryColumns;->CONTENT_URI:Landroid/net/Uri;

    invoke-virtual {v1, v2, v0}, Landroid/content/ContentResolver;->insert(Landroid/net/Uri;Landroid/content/ContentValues;)Landroid/net/Uri;

    move-result-object v1

    return-object v1
.end method

.method public addCategory([Lcom/htc/android/footprints/vo/Category;)V
    .locals 4
    .parameter "categorys"

    .prologue
    .line 327
    move-object v0, p1

    .local v0, arr$:[Lcom/htc/android/footprints/vo/Category;
    array-length v3, v0

    .local v3, len$:I
    const/4 v2, 0x0

    .local v2, i$:I
    :goto_0
    if-ge v2, v3, :cond_0

    aget-object v1, v0, v2

    .line 328
    .local v1, g:Lcom/htc/android/footprints/vo/Category;
    invoke-virtual {p0, v1}, Lcom/htc/android/footprints/provider/FootprintManager;->addCategory(Lcom/htc/android/footprints/vo/Category;)Landroid/net/Uri;

    .line 327
    add-int/lit8 v2, v2, 0x1

    goto :goto_0

    .line 330
    .end local v1           #g:Lcom/htc/android/footprints/vo/Category;
    :cond_0
    return-void
.end method

.method public declared-synchronized addFootprint(Lcom/htc/android/footprints/vo/Footprint;)I
    .locals 5
    .parameter "footprint"

    .prologue
    .line 69
    monitor-enter p0

    :try_start_0
    new-instance v2, Landroid/content/ContentValues;

    invoke-direct {v2}, Landroid/content/ContentValues;-><init>()V

    .line 70
    .local v2, values:Landroid/content/ContentValues;
    invoke-static {v2, p1}, Lcom/htc/android/footprints/provider/FootprintManager;->fillVauleFromFootprint(Landroid/content/ContentValues;Lcom/htc/android/footprints/vo/Footprint;)V

    .line 71
    const/4 v1, 0x0

    .line 72
    .local v1, uri:Landroid/net/Uri;
    invoke-static {v2}, Lcom/htc/android/footprints/provider/FootprintManager;->checkContentValues(Landroid/content/ContentValues;)Z

    move-result v3

    if-eqz v3, :cond_0

    .line 73
    iget-object v3, p0, Lcom/htc/android/footprints/provider/FootprintManager;->mDB:Landroid/content/ContentResolver;

    sget-object v4, Lcom/htc/android/footprints/provider/FootprintsProvider$FootprintColumns;->CONTENT_URI:Landroid/net/Uri;

    invoke-virtual {v3, v4, v2}, Landroid/content/ContentResolver;->insert(Landroid/net/Uri;Landroid/content/ContentValues;)Landroid/net/Uri;

    move-result-object v1

    .line 76
    :cond_0
    const/4 v0, -0x1

    .line 77
    .local v0, id:I
    if-eqz v1, :cond_1

    .line 78
    invoke-virtual {v1}, Landroid/net/Uri;->getLastPathSegment()Ljava/lang/String;

    move-result-object v3

    invoke-static {v3}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    move-result v0

    .line 81
    :cond_1
    monitor-exit p0

    return v0

    .line 69
    .end local v0           #id:I
    .end local v1           #uri:Landroid/net/Uri;
    .end local v2           #values:Landroid/content/ContentValues;
    :catchall_0
    move-exception v3

    monitor-exit p0

    throw v3
.end method

.method public addFootprint([Lcom/htc/android/footprints/vo/Footprint;)V
    .locals 4
    .parameter "footprint"

    .prologue
    .line 86
    move-object v0, p1

    .local v0, arr$:[Lcom/htc/android/footprints/vo/Footprint;
    array-length v3, v0

    .local v3, len$:I
    const/4 v2, 0x0

    .local v2, i$:I
    :goto_0
    if-ge v2, v3, :cond_0

    aget-object v1, v0, v2

    .line 87
    .local v1, f:Lcom/htc/android/footprints/vo/Footprint;
    invoke-virtual {p0, v1}, Lcom/htc/android/footprints/provider/FootprintManager;->addFootprint(Lcom/htc/android/footprints/vo/Footprint;)I

    .line 86
    add-int/lit8 v2, v2, 0x1

    goto :goto_0

    .line 89
    .end local v1           #f:Lcom/htc/android/footprints/vo/Footprint;
    :cond_0
    return-void
.end method

.method public addNonDuplicatedFootprint([Lcom/htc/android/footprints/vo/Footprint;)V
    .locals 6
    .parameter "footprint"

    .prologue
    .line 92
    move-object v0, p1

    .local v0, arr$:[Lcom/htc/android/footprints/vo/Footprint;
    array-length v3, v0

    .local v3, len$:I
    const/4 v2, 0x0

    .local v2, i$:I
    :goto_0
    if-ge v2, v3, :cond_1

    aget-object v1, v0, v2

    .line 93
    .local v1, f:Lcom/htc/android/footprints/vo/Footprint;
    invoke-static {v1}, Lcom/htc/android/footprints/provider/FootprintManager;->checkContentValues(Lcom/htc/android/footprints/vo/Footprint;)Z

    move-result v4

    if-eqz v4, :cond_0

    iget-wide v4, v1, Lcom/htc/android/footprints/vo/Footprint;->mCreateTime:J

    invoke-virtual {p0, v4, v5}, Lcom/htc/android/footprints/provider/FootprintManager;->checkExistedFootprintByCreateTime(J)Z

    move-result v4

    if-nez v4, :cond_0

    .line 94
    invoke-virtual {p0, v1}, Lcom/htc/android/footprints/provider/FootprintManager;->addFootprint(Lcom/htc/android/footprints/vo/Footprint;)I

    .line 92
    :cond_0
    add-int/lit8 v2, v2, 0x1

    goto :goto_0

    .line 97
    .end local v1           #f:Lcom/htc/android/footprints/vo/Footprint;
    :cond_1
    return-void
.end method

.method public checkExistedFootprintByCreateTime(J)Z
    .locals 8
    .parameter "create_time"

    .prologue
    const/4 v4, 0x0

    .line 151
    const/4 v7, 0x0

    .line 152
    .local v7, isExisted:Z
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    const-string v1, "create_time = \'"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0, p1, p2}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, "\'"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    .line 153
    .local v3, where:Ljava/lang/String;
    iget-object v0, p0, Lcom/htc/android/footprints/provider/FootprintManager;->mDB:Landroid/content/ContentResolver;

    sget-object v1, Lcom/htc/android/footprints/provider/FootprintsProvider$FootprintColumns;->CONTENT_URI:Landroid/net/Uri;

    sget-object v2, Lcom/htc/android/footprints/provider/FootprintManager;->FOOTPRINT_PROJECTION:[Ljava/lang/String;

    move-object v5, v4

    invoke-virtual/range {v0 .. v5}, Landroid/content/ContentResolver;->query(Landroid/net/Uri;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;

    move-result-object v6

    .line 155
    .local v6, cursor:Landroid/database/Cursor;
    invoke-interface {v6}, Landroid/database/Cursor;->moveToFirst()Z

    move-result v0

    if-eqz v0, :cond_0

    .line 156
    invoke-interface {v6}, Landroid/database/Cursor;->getCount()I

    move-result v0

    if-lez v0, :cond_1

    const/4 v0, 0x1

    move v7, v0

    .line 158
    :cond_0
    :goto_0
    invoke-interface {v6}, Landroid/database/Cursor;->close()V

    .line 159
    return v7

    .line 156
    :cond_1
    const/4 v0, 0x0

    move v7, v0

    goto :goto_0
.end method

.method public findCategory(Ljava/lang/String;)Lcom/htc/android/footprints/vo/Category;
    .locals 8
    .parameter "keyword"

    .prologue
    const/4 v4, 0x0

    .line 349
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    const-string v1, "keyword = \'"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, "\'"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    .line 350
    .local v3, where:Ljava/lang/String;
    iget-object v0, p0, Lcom/htc/android/footprints/provider/FootprintManager;->mDB:Landroid/content/ContentResolver;

    sget-object v1, Lcom/htc/android/footprints/provider/CategoryProvider$CategoryColumns;->CONTENT_URI:Landroid/net/Uri;

    sget-object v2, Lcom/htc/android/footprints/provider/FootprintManager;->CATEGORY_PROJECTION:[Ljava/lang/String;

    move-object v5, v4

    invoke-virtual/range {v0 .. v5}, Landroid/content/ContentResolver;->query(Landroid/net/Uri;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;

    move-result-object v7

    .line 352
    .local v7, cursor:Landroid/database/Cursor;
    const/4 v6, 0x0

    .line 353
    .local v6, cateogry:Lcom/htc/android/footprints/vo/Category;
    invoke-interface {v7}, Landroid/database/Cursor;->moveToNext()Z

    move-result v0

    if-eqz v0, :cond_0

    .line 354
    new-instance v6, Lcom/htc/android/footprints/vo/Category;

    .end local v6           #cateogry:Lcom/htc/android/footprints/vo/Category;
    invoke-direct {v6}, Lcom/htc/android/footprints/vo/Category;-><init>()V

    .line 355
    .restart local v6       #cateogry:Lcom/htc/android/footprints/vo/Category;
    invoke-direct {p0, v6, v7}, Lcom/htc/android/footprints/provider/FootprintManager;->fillDataFromCursor(Lcom/htc/android/footprints/vo/Category;Landroid/database/Cursor;)V

    .line 357
    :cond_0
    invoke-interface {v7}, Landroid/database/Cursor;->close()V

    .line 358
    return-object v6
.end method

.method public findFootprintByCategory(Ljava/lang/String;Ljava/lang/String;)Ljava/util/ArrayList;
    .locals 9
    .parameter "category"
    .parameter "sort"
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/lang/String;",
            "Ljava/lang/String;",
            ")",
            "Ljava/util/ArrayList",
            "<",
            "Lcom/htc/android/footprints/vo/Footprint;",
            ">;"
        }
    .end annotation

    .prologue
    .line 364
    new-instance v8, Ljava/util/ArrayList;

    invoke-direct {v8}, Ljava/util/ArrayList;-><init>()V

    .line 365
    .local v8, list:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lcom/htc/android/footprints/vo/Footprint;>;"
    const/4 v3, 0x0

    .line 366
    .local v3, where:Ljava/lang/String;
    if-eqz p1, :cond_0

    const-string v0, ""

    invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_0

    invoke-static {}, Lcom/htc/android/footprints/vo/Category;->getAllCategory()Lcom/htc/android/footprints/vo/Category;

    move-result-object v0

    iget-object v0, v0, Lcom/htc/android/footprints/vo/Category;->mKeyword:Ljava/lang/String;

    invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_0

    .line 367
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    const-string v1, "category  = "

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-direct {p0, p1}, Lcom/htc/android/footprints/provider/FootprintManager;->quotedStr(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    .line 371
    :cond_0
    iget-object v0, p0, Lcom/htc/android/footprints/provider/FootprintManager;->mDB:Landroid/content/ContentResolver;

    sget-object v1, Lcom/htc/android/footprints/provider/FootprintsProvider$FootprintColumns;->CONTENT_URI:Landroid/net/Uri;

    sget-object v2, Lcom/htc/android/footprints/provider/FootprintManager;->FOOTPRINT_PROJECTION:[Ljava/lang/String;

    const/4 v4, 0x0

    move-object v5, p2

    invoke-virtual/range {v0 .. v5}, Landroid/content/ContentResolver;->query(Landroid/net/Uri;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;

    move-result-object v6

    .line 375
    .local v6, cursor:Landroid/database/Cursor;
    :goto_0
    invoke-interface {v6}, Landroid/database/Cursor;->moveToNext()Z

    move-result v0

    if-eqz v0, :cond_1

    .line 376
    new-instance v7, Lcom/htc/android/footprints/vo/Footprint;

    invoke-direct {v7}, Lcom/htc/android/footprints/vo/Footprint;-><init>()V

    .line 377
    .local v7, footprint:Lcom/htc/android/footprints/vo/Footprint;
    invoke-static {v7, v6}, Lcom/htc/android/footprints/provider/FootprintManager;->fillDataFromCursor(Lcom/htc/android/footprints/vo/Footprint;Landroid/database/Cursor;)V

    .line 378
    invoke-virtual {v8, v7}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    goto :goto_0

    .line 380
    .end local v7           #footprint:Lcom/htc/android/footprints/vo/Footprint;
    :cond_1
    invoke-interface {v6}, Landroid/database/Cursor;->close()V

    .line 381
    return-object v8
.end method

.method public findFootprintByMatchString(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/util/ArrayList;
    .locals 9
    .parameter "keyword"
    .parameter "searchWord"
    .parameter "sort"
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/lang/String;",
            "Ljava/lang/String;",
            "Ljava/lang/String;",
            ")",
            "Ljava/util/ArrayList",
            "<",
            "Lcom/htc/android/footprints/vo/Footprint;",
            ">;"
        }
    .end annotation

    .prologue
    .line 198
    new-instance v7, Lcom/htc/android/footprints/vo/Footprint;

    invoke-direct {v7}, Lcom/htc/android/footprints/vo/Footprint;-><init>()V

    .line 200
    .local v7, footprint:Lcom/htc/android/footprints/vo/Footprint;
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    const-string v1, "name like \'%"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, "%\'"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    .line 202
    .local v3, where:Ljava/lang/String;
    if-eqz p1, :cond_0

    const-string v0, ""

    invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_0

    .line 203
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, " AND category  = "

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-direct {p0, p1}, Lcom/htc/android/footprints/provider/FootprintManager;->quotedStr(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    .line 207
    :cond_0
    iget-object v0, p0, Lcom/htc/android/footprints/provider/FootprintManager;->mDB:Landroid/content/ContentResolver;

    sget-object v1, Lcom/htc/android/footprints/provider/FootprintsProvider$FootprintColumns;->CONTENT_URI:Landroid/net/Uri;

    sget-object v2, Lcom/htc/android/footprints/provider/FootprintManager;->FOOTPRINT_PROJECTION:[Ljava/lang/String;

    const/4 v4, 0x0

    move-object v5, p3

    invoke-virtual/range {v0 .. v5}, Landroid/content/ContentResolver;->query(Landroid/net/Uri;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;

    move-result-object v6

    .line 209
    .local v6, cursor:Landroid/database/Cursor;
    invoke-interface {v6}, Landroid/database/Cursor;->deactivate()V

    .line 210
    new-instance v8, Ljava/util/ArrayList;

    invoke-interface {v6}, Landroid/database/Cursor;->getCount()I

    move-result v0

    invoke-direct {v8, v0}, Ljava/util/ArrayList;-><init>(I)V

    .line 213
    .local v8, result:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lcom/htc/android/footprints/vo/Footprint;>;"
    :goto_0
    invoke-interface {v6}, Landroid/database/Cursor;->moveToNext()Z

    move-result v0

    if-eqz v0, :cond_1

    .line 214
    new-instance v7, Lcom/htc/android/footprints/vo/Footprint;

    .end local v7           #footprint:Lcom/htc/android/footprints/vo/Footprint;
    invoke-direct {v7}, Lcom/htc/android/footprints/vo/Footprint;-><init>()V

    .line 215
    .restart local v7       #footprint:Lcom/htc/android/footprints/vo/Footprint;
    invoke-static {v7, v6}, Lcom/htc/android/footprints/provider/FootprintManager;->fillDataFromCursor(Lcom/htc/android/footprints/vo/Footprint;Landroid/database/Cursor;)V

    .line 216
    invoke-virtual {v8, v7}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    goto :goto_0

    .line 218
    :cond_1
    invoke-interface {v6}, Landroid/database/Cursor;->close()V

    .line 219
    return-object v8
.end method

.method public findFootprintCursorByCategory(Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;
    .locals 6
    .parameter "category"
    .parameter "sort"

    .prologue
    .line 386
    const/4 v3, 0x0

    .line 387
    .local v3, where:Ljava/lang/String;
    if-eqz p1, :cond_0

    const-string v0, ""

    invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_0

    invoke-static {}, Lcom/htc/android/footprints/vo/Category;->getAllCategory()Lcom/htc/android/footprints/vo/Category;

    move-result-object v0

    iget-object v0, v0, Lcom/htc/android/footprints/vo/Category;->mKeyword:Ljava/lang/String;

    invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_0

    .line 388
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    const-string v1, "category  = "

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-direct {p0, p1}, Lcom/htc/android/footprints/provider/FootprintManager;->quotedStr(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    .line 391
    :cond_0
    iget-object v0, p0, Lcom/htc/android/footprints/provider/FootprintManager;->mDB:Landroid/content/ContentResolver;

    sget-object v1, Lcom/htc/android/footprints/provider/FootprintsProvider$FootprintColumns;->CONTENT_URI:Landroid/net/Uri;

    sget-object v2, Lcom/htc/android/footprints/provider/FootprintManager;->FOOTPRINT_PROJECTION:[Ljava/lang/String;

    const/4 v4, 0x0

    move-object v5, p2

    invoke-virtual/range {v0 .. v5}, Landroid/content/ContentResolver;->query(Landroid/net/Uri;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;

    move-result-object v0

    return-object v0
.end method

.method public findFootprintCursorByCategoryAndKeyword(Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;
    .locals 6
    .parameter "category"
    .parameter "keyword"

    .prologue
    const/4 v4, 0x0

    const-string v2, ""

    .line 397
    const/4 v3, 0x0

    .line 399
    .local v3, where:Ljava/lang/String;
    const-string v3, "accuracy > 0 "

    .line 401
    if-eqz p1, :cond_0

    const-string v0, ""

    invoke-virtual {p1, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_0

    invoke-static {}, Lcom/htc/android/footprints/vo/Category;->getAllCategory()Lcom/htc/android/footprints/vo/Category;

    move-result-object v0

    iget-object v0, v0, Lcom/htc/android/footprints/vo/Category;->mKeyword:Ljava/lang/String;

    invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_0

    .line 402
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, "AND category  = "

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-direct {p0, p1}, Lcom/htc/android/footprints/provider/FootprintManager;->quotedStr(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    .line 405
    :cond_0
    if-eqz p2, :cond_1

    const-string v0, ""

    invoke-virtual {p2, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_1

    .line 406
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, "AND name  like "

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "%"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-direct {p0, v1}, Lcom/htc/android/footprints/provider/FootprintManager;->quotedStr(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    .line 409
    :cond_1
    iget-object v0, p0, Lcom/htc/android/footprints/provider/FootprintManager;->mDB:Landroid/content/ContentResolver;

    sget-object v1, Lcom/htc/android/footprints/provider/FootprintsProvider$FootprintColumns;->CONTENT_URI:Landroid/net/Uri;

    sget-object v2, Lcom/htc/android/footprints/provider/FootprintManager;->FOOTPRINT_PROJECTION:[Ljava/lang/String;

    move-object v5, v4

    invoke-virtual/range {v0 .. v5}, Landroid/content/ContentResolver;->query(Landroid/net/Uri;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;

    move-result-object v0

    return-object v0
.end method

.method public findFootprintWithoutMatchString(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/util/ArrayList;
    .locals 9
    .parameter "keyword"
    .parameter "searchStr"
    .parameter "sort"
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/lang/String;",
            "Ljava/lang/String;",
            "Ljava/lang/String;",
            ")",
            "Ljava/util/ArrayList",
            "<",
            "Lcom/htc/android/footprints/vo/Footprint;",
            ">;"
        }
    .end annotation

    .prologue
    .line 224
    new-instance v7, Lcom/htc/android/footprints/vo/Footprint;

    invoke-direct {v7}, Lcom/htc/android/footprints/vo/Footprint;-><init>()V

    .line 226
    .local v7, footprint:Lcom/htc/android/footprints/vo/Footprint;
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    const-string v1, "name not in (select name from footprint where name like \'%"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, "%\')"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    .line 231
    .local v3, where:Ljava/lang/String;
    if-eqz p1, :cond_0

    const-string v0, ""

    invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_0

    .line 232
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, " AND category  = "

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-direct {p0, p1}, Lcom/htc/android/footprints/provider/FootprintManager;->quotedStr(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    .line 236
    :cond_0
    iget-object v0, p0, Lcom/htc/android/footprints/provider/FootprintManager;->mDB:Landroid/content/ContentResolver;

    sget-object v1, Lcom/htc/android/footprints/provider/FootprintsProvider$FootprintColumns;->CONTENT_URI:Landroid/net/Uri;

    sget-object v2, Lcom/htc/android/footprints/provider/FootprintManager;->FOOTPRINT_PROJECTION:[Ljava/lang/String;

    const/4 v4, 0x0

    move-object v5, p3

    invoke-virtual/range {v0 .. v5}, Landroid/content/ContentResolver;->query(Landroid/net/Uri;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;

    move-result-object v6

    .line 239
    .local v6, cursor:Landroid/database/Cursor;
    new-instance v8, Ljava/util/ArrayList;

    invoke-interface {v6}, Landroid/database/Cursor;->getCount()I

    move-result v0

    invoke-direct {v8, v0}, Ljava/util/ArrayList;-><init>(I)V

    .line 241
    .local v8, result:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lcom/htc/android/footprints/vo/Footprint;>;"
    invoke-interface {v6}, Landroid/database/Cursor;->moveToFirst()Z

    .line 242
    :goto_0
    invoke-interface {v6}, Landroid/database/Cursor;->moveToNext()Z

    move-result v0

    if-eqz v0, :cond_1

    .line 243
    new-instance v7, Lcom/htc/android/footprints/vo/Footprint;

    .end local v7           #footprint:Lcom/htc/android/footprints/vo/Footprint;
    invoke-direct {v7}, Lcom/htc/android/footprints/vo/Footprint;-><init>()V

    .line 244
    .restart local v7       #footprint:Lcom/htc/android/footprints/vo/Footprint;
    invoke-static {v7, v6}, Lcom/htc/android/footprints/provider/FootprintManager;->fillDataFromCursor(Lcom/htc/android/footprints/vo/Footprint;Landroid/database/Cursor;)V

    .line 245
    invoke-virtual {v8, v7}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    goto :goto_0

    .line 247
    :cond_1
    invoke-interface {v6}, Landroid/database/Cursor;->close()V

    .line 248
    return-object v8
.end method

.method public getAllCategory()Ljava/util/ArrayList;
    .locals 9
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "()",
            "Ljava/util/ArrayList",
            "<",
            "Lcom/htc/android/footprints/vo/Category;",
            ">;"
        }
    .end annotation

    .prologue
    const/4 v3, 0x0

    .line 302
    iget-object v0, p0, Lcom/htc/android/footprints/provider/FootprintManager;->mDB:Landroid/content/ContentResolver;

    sget-object v1, Lcom/htc/android/footprints/provider/CategoryProvider$CategoryColumns;->CONTENT_URI:Landroid/net/Uri;

    sget-object v2, Lcom/htc/android/footprints/provider/FootprintManager;->CATEGORY_PROJECTION:[Ljava/lang/String;

    move-object v4, v3

    move-object v5, v3

    invoke-virtual/range {v0 .. v5}, Landroid/content/ContentResolver;->query(Landroid/net/Uri;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;

    move-result-object v7

    .line 304
    .local v7, cursor:Landroid/database/Cursor;
    invoke-interface {v7}, Landroid/database/Cursor;->deactivate()V

    .line 305
    new-instance v8, Ljava/util/ArrayList;

    invoke-interface {v7}, Landroid/database/Cursor;->getCount()I

    move-result v0

    invoke-direct {v8, v0}, Ljava/util/ArrayList;-><init>(I)V

    .line 307
    .local v8, result:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lcom/htc/android/footprints/vo/Category;>;"
    :goto_0
    invoke-interface {v7}, Landroid/database/Cursor;->moveToNext()Z

    move-result v0

    if-eqz v0, :cond_0

    .line 308
    new-instance v6, Lcom/htc/android/footprints/vo/Category;

    invoke-direct {v6}, Lcom/htc/android/footprints/vo/Category;-><init>()V

    .line 309
    .local v6, cateogry:Lcom/htc/android/footprints/vo/Category;
    invoke-direct {p0, v6, v7}, Lcom/htc/android/footprints/provider/FootprintManager;->fillDataFromCursor(Lcom/htc/android/footprints/vo/Category;Landroid/database/Cursor;)V

    .line 310
    invoke-virtual {v8, v6}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    goto :goto_0

    .line 312
    .end local v6           #cateogry:Lcom/htc/android/footprints/vo/Category;
    :cond_0
    invoke-interface {v7}, Landroid/database/Cursor;->close()V

    .line 313
    return-object v8
.end method

.method public getCursorSortBy(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;
    .locals 8
    .parameter "keyword"
    .parameter "searchWord"
    .parameter "sort"

    .prologue
    const-string v7, " like \'% "

    const-string v5, " like \'"

    const-string v4, ""

    const-string v3, "%\' "

    const-string v2, " OR "

    .line 253
    new-instance v6, Ljava/lang/StringBuilder;

    invoke-direct {v6}, Ljava/lang/StringBuilder;-><init>()V

    .line 254
    .local v6, where:Ljava/lang/StringBuilder;
    if-eqz p1, :cond_0

    const-string v0, ""

    invoke-virtual {p1, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_0

    .line 255
    const-string v0, "category"

    invoke-virtual {v6, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, " = "

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-direct {p0, p1}, Lcom/htc/android/footprints/provider/FootprintManager;->quotedStr(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 258
    :cond_0
    if-eqz p2, :cond_1

    const-string v0, ""

    invoke-virtual {p2, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_1

    .line 259
    invoke-virtual {v6}, Ljava/lang/StringBuilder;->length()I

    move-result v0

    if-lez v0, :cond_2

    .line 260
    const-string v0, " AND ("

    invoke-virtual {v6, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 264
    :goto_0
    const-string v0, "name"

    invoke-virtual {v6, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, " like \'% "

    invoke-virtual {v0, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, "%\' "

    invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 265
    const-string v0, " OR "

    invoke-virtual {v6, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 266
    const-string v0, "name"

    invoke-virtual {v6, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, " like \'"

    invoke-virtual {v0, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, "%\' "

    invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 267
    const-string v0, " OR "

    invoke-virtual {v6, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 268
    const-string v0, "addr"

    invoke-virtual {v6, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, " like \'% "

    invoke-virtual {v0, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, "%\' "

    invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 269
    const-string v0, " OR "

    invoke-virtual {v6, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 270
    const-string v0, "addr"

    invoke-virtual {v6, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, " like \'"

    invoke-virtual {v0, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, "%\') "

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 273
    :cond_1
    iget-object v0, p0, Lcom/htc/android/footprints/provider/FootprintManager;->mDB:Landroid/content/ContentResolver;

    sget-object v1, Lcom/htc/android/footprints/provider/FootprintsProvider$FootprintColumns;->CONTENT_URI:Landroid/net/Uri;

    sget-object v2, Lcom/htc/android/footprints/provider/FootprintManager;->FOOTPRINT_PROJECTION:[Ljava/lang/String;

    invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    const/4 v4, 0x0

    move-object v5, p3

    invoke-virtual/range {v0 .. v5}, Landroid/content/ContentResolver;->query(Landroid/net/Uri;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;

    move-result-object v0

    return-object v0

    .line 262
    :cond_2
    const-string v0, " ("

    invoke-virtual {v6, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    goto :goto_0
.end method

.method public getExistFootprintID(Lcom/htc/android/footprints/vo/Footprint;)J
    .locals 11
    .parameter "footprint"

    .prologue
    const/4 v4, 0x0

    .line 582
    const-wide/16 v7, -0x1

    .line 583
    .local v7, exist_id:J
    const/4 v3, 0x0

    .line 596
    .local v3, where_clause:Ljava/lang/String;
    iget-wide v0, p1, Lcom/htc/android/footprints/vo/Footprint;->mCreateTime:J

    const-wide/16 v9, 0x0

    cmp-long v0, v0, v9

    if-lez v0, :cond_0

    .line 597
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    const-string v1, "create_time = \'"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    iget-wide v1, p1, Lcom/htc/android/footprints/vo/Footprint;->mCreateTime:J

    invoke-virtual {v0, v1, v2}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, "\'"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    .line 599
    :cond_0
    iget-object v0, p0, Lcom/htc/android/footprints/provider/FootprintManager;->mDB:Landroid/content/ContentResolver;

    sget-object v1, Lcom/htc/android/footprints/provider/FootprintsProvider$FootprintColumns;->CONTENT_URI:Landroid/net/Uri;

    sget-object v2, Lcom/htc/android/footprints/provider/FootprintManager;->FOOTPRINT_PROJECTION:[Ljava/lang/String;

    move-object v5, v4

    invoke-virtual/range {v0 .. v5}, Landroid/content/ContentResolver;->query(Landroid/net/Uri;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;

    move-result-object v6

    .line 601
    .local v6, cursor:Landroid/database/Cursor;
    invoke-interface {v6}, Landroid/database/Cursor;->moveToNext()Z

    move-result v0

    if-eqz v0, :cond_1

    .line 602
    const-string v0, "_id"

    invoke-interface {v6, v0}, Landroid/database/Cursor;->getColumnIndexOrThrow(Ljava/lang/String;)I

    move-result v0

    invoke-interface {v6, v0}, Landroid/database/Cursor;->getLong(I)J

    move-result-wide v7

    .line 604
    :cond_1
    invoke-interface {v6}, Landroid/database/Cursor;->close()V

    .line 605
    return-wide v7
.end method

.method public getFootprintAll(Ljava/lang/String;)Ljava/util/ArrayList;
    .locals 1
    .parameter "sort"
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/lang/String;",
            ")",
            "Ljava/util/ArrayList",
            "<",
            "Lcom/htc/android/footprints/vo/Footprint;",
            ">;"
        }
    .end annotation

    .prologue
    .line 280
    const/4 v0, 0x0

    invoke-virtual {p0, v0, p1}, Lcom/htc/android/footprints/provider/FootprintManager;->findFootprintByCategory(Ljava/lang/String;Ljava/lang/String;)Ljava/util/ArrayList;

    move-result-object v0

    return-object v0
.end method

.method public getFootprintById(I)Lcom/htc/android/footprints/vo/Footprint;
    .locals 8
    .parameter "id"

    .prologue
    const/4 v4, 0x0

    .line 163
    new-instance v7, Lcom/htc/android/footprints/vo/Footprint;

    invoke-direct {v7}, Lcom/htc/android/footprints/vo/Footprint;-><init>()V

    .line 165
    .local v7, footprint:Lcom/htc/android/footprints/vo/Footprint;
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    const-string v1, "_id = \'"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-static {p1}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, "\'"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    .line 167
    .local v3, where:Ljava/lang/String;
    iget-object v0, p0, Lcom/htc/android/footprints/provider/FootprintManager;->mDB:Landroid/content/ContentResolver;

    sget-object v1, Lcom/htc/android/footprints/provider/FootprintsProvider$FootprintColumns;->CONTENT_URI:Landroid/net/Uri;

    sget-object v2, Lcom/htc/android/footprints/provider/FootprintManager;->FOOTPRINT_PROJECTION:[Ljava/lang/String;

    move-object v5, v4

    invoke-virtual/range {v0 .. v5}, Landroid/content/ContentResolver;->query(Landroid/net/Uri;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;

    move-result-object v6

    .line 170
    .local v6, cursor:Landroid/database/Cursor;
    :goto_0
    invoke-interface {v6}, Landroid/database/Cursor;->moveToNext()Z

    move-result v0

    if-eqz v0, :cond_0

    .line 171
    invoke-static {v7, v6}, Lcom/htc/android/footprints/provider/FootprintManager;->fillDataFromCursor(Lcom/htc/android/footprints/vo/Footprint;Landroid/database/Cursor;)V

    goto :goto_0

    .line 173
    :cond_0
    invoke-interface {v6}, Landroid/database/Cursor;->close()V

    .line 175
    return-object v7
.end method

.method public getFootprintByName(Ljava/lang/String;)Lcom/htc/android/footprints/vo/Footprint;
    .locals 8
    .parameter "name"

    .prologue
    .line 180
    new-instance v7, Lcom/htc/android/footprints/vo/Footprint;

    invoke-direct {v7}, Lcom/htc/android/footprints/vo/Footprint;-><init>()V

    .line 182
    .local v7, footprint:Lcom/htc/android/footprints/vo/Footprint;
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    const-string v1, "name = \'"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, "\'"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    .line 184
    .local v3, where:Ljava/lang/String;
    iget-object v0, p0, Lcom/htc/android/footprints/provider/FootprintManager;->mDB:Landroid/content/ContentResolver;

    sget-object v1, Lcom/htc/android/footprints/provider/FootprintsProvider$FootprintColumns;->CONTENT_URI:Landroid/net/Uri;

    sget-object v2, Lcom/htc/android/footprints/provider/FootprintManager;->FOOTPRINT_PROJECTION:[Ljava/lang/String;

    const/4 v4, 0x0

    const-string v5, "create_time desc"

    invoke-virtual/range {v0 .. v5}, Landroid/content/ContentResolver;->query(Landroid/net/Uri;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;

    move-result-object v6

    .line 188
    .local v6, cursor:Landroid/database/Cursor;
    invoke-interface {v6}, Landroid/database/Cursor;->moveToNext()Z

    move-result v0

    if-eqz v0, :cond_0

    .line 189
    invoke-static {v7, v6}, Lcom/htc/android/footprints/provider/FootprintManager;->fillDataFromCursor(Lcom/htc/android/footprints/vo/Footprint;Landroid/database/Cursor;)V

    .line 191
    :cond_0
    invoke-interface {v6}, Landroid/database/Cursor;->close()V

    .line 192
    return-object v7
.end method

.method public getFootprintByRange(Ljava/lang/String;II)Ljava/util/ArrayList;
    .locals 5
    .parameter "sort"
    .parameter "offset"
    .parameter "count"
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/lang/String;",
            "II)",
            "Ljava/util/ArrayList",
            "<",
            "Lcom/htc/android/footprints/vo/Footprint;",
            ">;"
        }
    .end annotation

    .prologue
    const-string v4, "_id"

    const-string v3, " limit "

    .line 285
    const/4 v0, 0x0

    .line 286
    .local v0, option:Ljava/lang/String;
    if-ltz p2, :cond_1

    .line 287
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    if-eqz p1, :cond_0

    move-object v2, p1

    :goto_0
    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, " limit "

    invoke-virtual {v1, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1, p3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, " offset "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1, p2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    .line 294
    :goto_1
    const/4 v1, 0x0

    invoke-virtual {p0, v1, v0}, Lcom/htc/android/footprints/provider/FootprintManager;->findFootprintByCategory(Ljava/lang/String;Ljava/lang/String;)Ljava/util/ArrayList;

    move-result-object v1

    return-object v1

    .line 287
    :cond_0
    const-string v2, "_id"

    move-object v2, v4

    goto :goto_0

    .line 290
    :cond_1
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    if-eqz p1, :cond_2

    move-object v2, p1

    :goto_2
    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, " limit "

    invoke-virtual {v1, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1, p3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, "  offset (select count(_id) from footprint) "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1, p2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    goto :goto_1

    :cond_2
    const-string v2, "_id"

    move-object v2, v4

    goto :goto_2
.end method

.method public hasFootprints()Z
    .locals 3

    .prologue
    const/4 v2, 0x1

    const/4 v1, 0x0

    .line 298
    const/4 v0, 0x0

    invoke-virtual {p0, v0, v1, v2}, Lcom/htc/android/footprints/provider/FootprintManager;->getFootprintByRange(Ljava/lang/String;II)Ljava/util/ArrayList;

    move-result-object v0

    invoke-virtual {v0}, Ljava/util/ArrayList;->isEmpty()Z

    move-result v0

    if-nez v0, :cond_0

    move v0, v2

    :goto_0
    return v0

    :cond_0
    move v0, v1

    goto :goto_0
.end method

.method public isExistFootprint(Lcom/htc/android/footprints/vo/Footprint;)Z
    .locals 10
    .parameter "footprint"

    .prologue
    const/4 v4, 0x0

    .line 557
    const/4 v7, 0x0

    .line 558
    .local v7, isExist:Z
    const/4 v3, 0x0

    .line 571
    .local v3, where_clause:Ljava/lang/String;
    iget-wide v0, p1, Lcom/htc/android/footprints/vo/Footprint;->mCreateTime:J

    const-wide/16 v8, 0x0

    cmp-long v0, v0, v8

    if-lez v0, :cond_0

    .line 572
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    const-string v1, "create_time = \'"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    iget-wide v1, p1, Lcom/htc/android/footprints/vo/Footprint;->mCreateTime:J

    invoke-virtual {v0, v1, v2}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, "\'"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    .line 574
    :cond_0
    iget-object v0, p0, Lcom/htc/android/footprints/provider/FootprintManager;->mDB:Landroid/content/ContentResolver;

    sget-object v1, Lcom/htc/android/footprints/provider/FootprintsProvider$FootprintColumns;->CONTENT_URI:Landroid/net/Uri;

    sget-object v2, Lcom/htc/android/footprints/provider/FootprintManager;->FOOTPRINT_PROJECTION:[Ljava/lang/String;

    move-object v5, v4

    invoke-virtual/range {v0 .. v5}, Landroid/content/ContentResolver;->query(Landroid/net/Uri;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;

    move-result-object v6

    .line 576
    .local v6, cursor:Landroid/database/Cursor;
    invoke-interface {v6}, Landroid/database/Cursor;->getCount()I

    move-result v0

    if-lez v0, :cond_1

    const/4 v7, 0x1

    .line 577
    :cond_1
    invoke-interface {v6}, Landroid/database/Cursor;->close()V

    .line 578
    return v7
.end method

.method public modifyCategory(Lcom/htc/android/footprints/vo/Category;)V
    .locals 5
    .parameter "g"

    .prologue
    .line 339
    new-instance v0, Landroid/content/ContentValues;

    invoke-direct {v0}, Landroid/content/ContentValues;-><init>()V

    .line 341
    .local v0, values:Landroid/content/ContentValues;
    invoke-direct {p0, v0, p1}, Lcom/htc/android/footprints/provider/FootprintManager;->fillVauleFromCategory(Landroid/content/ContentValues;Lcom/htc/android/footprints/vo/Category;)V

    .line 343
    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    const-string v3, "keyword = \'"

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    iget-object v3, p1, Lcom/htc/android/footprints/vo/Category;->mKeyword:Ljava/lang/String;

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    const-string v3, "\'"

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    .line 344
    .local v1, where:Ljava/lang/String;
    iget-object v2, p0, Lcom/htc/android/footprints/provider/FootprintManager;->mDB:Landroid/content/ContentResolver;

    sget-object v3, Lcom/htc/android/footprints/provider/CategoryProvider$CategoryColumns;->CONTENT_URI:Landroid/net/Uri;

    const/4 v4, 0x0

    invoke-virtual {v2, v3, v0, v1, v4}, Landroid/content/ContentResolver;->update(Landroid/net/Uri;Landroid/content/ContentValues;Ljava/lang/String;[Ljava/lang/String;)I

    .line 345
    return-void
.end method

.method public modifyFootprint(Lcom/htc/android/footprints/vo/Footprint;)V
    .locals 5
    .parameter "footprint"

    .prologue
    .line 133
    new-instance v0, Landroid/content/ContentValues;

    invoke-direct {v0}, Landroid/content/ContentValues;-><init>()V

    .line 135
    .local v0, values:Landroid/content/ContentValues;
    invoke-static {v0, p1}, Lcom/htc/android/footprints/provider/FootprintManager;->fillVauleFromFootprint(Landroid/content/ContentValues;Lcom/htc/android/footprints/vo/Footprint;)V

    .line 137
    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    const-string v3, "_id = \'"

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {p1}, Lcom/htc/android/footprints/vo/Footprint;->getID()I

    move-result v3

    invoke-static {v3}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    const-string v3, "\'"

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    .line 139
    .local v1, where:Ljava/lang/String;
    iget-object v2, p0, Lcom/htc/android/footprints/provider/FootprintManager;->mDB:Landroid/content/ContentResolver;

    sget-object v3, Lcom/htc/android/footprints/provider/FootprintsProvider$FootprintColumns;->CONTENT_URI:Landroid/net/Uri;

    const/4 v4, 0x0

    invoke-virtual {v2, v3, v0, v1, v4}, Landroid/content/ContentResolver;->update(Landroid/net/Uri;Landroid/content/ContentValues;Ljava/lang/String;[Ljava/lang/String;)I

    .line 140
    return-void
.end method

.method public modifyFootprintbyImport(Lcom/htc/android/footprints/vo/Footprint;)V
    .locals 5
    .parameter "footprint"

    .prologue
    .line 143
    new-instance v0, Landroid/content/ContentValues;

    invoke-direct {v0}, Landroid/content/ContentValues;-><init>()V

    .line 144
    .local v0, values:Landroid/content/ContentValues;
    invoke-static {v0, p1}, Lcom/htc/android/footprints/provider/FootprintManager;->fillVauleFromFootprint(Landroid/content/ContentValues;Lcom/htc/android/footprints/vo/Footprint;)V

    .line 145
    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    const-string v3, "create_time = \'"

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    iget-wide v3, p1, Lcom/htc/android/footprints/vo/Footprint;->mCreateTime:J

    invoke-virtual {v2, v3, v4}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    move-result-object v2

    const-string v3, "\'"

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    .line 147
    .local v1, where:Ljava/lang/String;
    iget-object v2, p0, Lcom/htc/android/footprints/provider/FootprintManager;->mDB:Landroid/content/ContentResolver;

    sget-object v3, Lcom/htc/android/footprints/provider/FootprintsProvider$FootprintColumns;->CONTENT_URI:Landroid/net/Uri;

    const/4 v4, 0x0

    invoke-virtual {v2, v3, v0, v1, v4}, Landroid/content/ContentResolver;->update(Landroid/net/Uri;Landroid/content/ContentValues;Ljava/lang/String;[Ljava/lang/String;)I

    .line 148
    return-void
.end method

.method public removeAllFootprint()V
    .locals 3

    .prologue
    const/4 v2, 0x0

    .line 119
    iget-object v0, p0, Lcom/htc/android/footprints/provider/FootprintManager;->mDB:Landroid/content/ContentResolver;

    sget-object v1, Lcom/htc/android/footprints/provider/FootprintsProvider$FootprintColumns;->CONTENT_URI:Landroid/net/Uri;

    invoke-virtual {v0, v1, v2, v2}, Landroid/content/ContentResolver;->delete(Landroid/net/Uri;Ljava/lang/String;[Ljava/lang/String;)I

    .line 120
    return-void
.end method

.method public removeCategory(Lcom/htc/android/footprints/vo/Category;)V
    .locals 4
    .parameter "g"

    .prologue
    .line 333
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "keyword = \'"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    iget-object v2, p1, Lcom/htc/android/footprints/vo/Category;->mKeyword:Ljava/lang/String;

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, "\'"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    .line 334
    .local v0, where:Ljava/lang/String;
    iget-object v1, p0, Lcom/htc/android/footprints/provider/FootprintManager;->mDB:Landroid/content/ContentResolver;

    sget-object v2, Lcom/htc/android/footprints/provider/CategoryProvider$CategoryColumns;->CONTENT_URI:Landroid/net/Uri;

    const/4 v3, 0x0

    invoke-virtual {v1, v2, v0, v3}, Landroid/content/ContentResolver;->delete(Landroid/net/Uri;Ljava/lang/String;[Ljava/lang/String;)I

    .line 335
    return-void
.end method

.method public removeFootprint(I)V
    .locals 1
    .parameter "id"

    .prologue
    .line 115
    invoke-static {p1}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v0

    invoke-virtual {p0, v0}, Lcom/htc/android/footprints/provider/FootprintManager;->removeFootprint(Ljava/lang/String;)V

    .line 116
    return-void
.end method

.method public removeFootprint(Lcom/htc/android/footprints/vo/Footprint;)V
    .locals 1
    .parameter "footprint"

    .prologue
    .line 128
    invoke-virtual {p1}, Lcom/htc/android/footprints/vo/Footprint;->getID()I

    move-result v0

    invoke-virtual {p0, v0}, Lcom/htc/android/footprints/provider/FootprintManager;->removeFootprint(I)V

    .line 129
    return-void
.end method

.method public removeFootprint(Ljava/lang/String;)V
    .locals 4
    .parameter "id"

    .prologue
    .line 123
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "_id = \'"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, "\'"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    .line 124
    .local v0, where:Ljava/lang/String;
    iget-object v1, p0, Lcom/htc/android/footprints/provider/FootprintManager;->mDB:Landroid/content/ContentResolver;

    sget-object v2, Lcom/htc/android/footprints/provider/FootprintsProvider$FootprintColumns;->CONTENT_URI:Landroid/net/Uri;

    const/4 v3, 0x0

    invoke-virtual {v1, v2, v0, v3}, Landroid/content/ContentResolver;->delete(Landroid/net/Uri;Ljava/lang/String;[Ljava/lang/String;)I

    .line 125
    return-void
.end method

.method public removeFootprint([Lcom/htc/android/footprints/vo/Footprint;)V
    .locals 10
    .parameter "footprints"

    .prologue
    .line 100
    new-instance v5, Ljava/lang/StringBuilder;

    const-string v6, "_id"

    invoke-direct {v5, v6}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    .line 101
    .local v5, where:Ljava/lang/StringBuilder;
    const-string v6, " in ("

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 102
    const/4 v2, 0x1

    .line 103
    .local v2, first:Z
    move-object v0, p1

    .local v0, arr$:[Lcom/htc/android/footprints/vo/Footprint;
    array-length v4, v0

    .local v4, len$:I
    const/4 v3, 0x0

    .local v3, i$:I
    :goto_0
    if-ge v3, v4, :cond_1

    aget-object v1, v0, v3

    .line 104
    .local v1, f:Lcom/htc/android/footprints/vo/Footprint;
    if-nez v2, :cond_0

    .line 105
    const-string v6, ","

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 107
    :cond_0
    const/4 v2, 0x0

    .line 108
    invoke-virtual {v1}, Lcom/htc/android/footprints/vo/Footprint;->getID()I

    move-result v6

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    .line 103
    add-int/lit8 v3, v3, 0x1

    goto :goto_0

    .line 110
    .end local v1           #f:Lcom/htc/android/footprints/vo/Footprint;
    :cond_1
    const-string v6, ")"

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 111
    iget-object v6, p0, Lcom/htc/android/footprints/provider/FootprintManager;->mDB:Landroid/content/ContentResolver;

    sget-object v7, Lcom/htc/android/footprints/provider/FootprintsProvider$FootprintColumns;->CONTENT_URI:Landroid/net/Uri;

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v8

    const/4 v9, 0x0

    invoke-virtual {v6, v7, v8, v9}, Landroid/content/ContentResolver;->delete(Landroid/net/Uri;Ljava/lang/String;[Ljava/lang/String;)I

    .line 112
    return-void
.end method
